cmake_minimum_required (VERSION 2.8)

project(gameSrv)
SET( EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/../../bin)
SET(CMAKE_C_COMPILER g++)

INCLUDE(${PROJECT_SOURCE_DIR}/../cmake_v.cmake)
#选择c++ 11
#include(CheckCXXCompilerFlag)
#CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
#CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)  
#
#if(COMPILER_SUPPORTS_CXX11)  
#        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")  
#elseif(COMPILER_SUPPORTS_CXX0X)  
#        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")  
#else()  
#    add_definitions(-std=c++11)
#    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
#    message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")  
#endif()  
#
#add_definitions(-g)
#
#IF (CMAKE_BUILD_TYPE STREQUAL Debug)
#    message( "build debug.................. CXX_FLAGS: " ${CMAKE_CXX_FLAGS_DEBUG} )
#    ADD_DEFINITIONS( -D_DEBUG_ )
#    ADD_DEFINITIONS( -D_DEBUG )
#ELSEIF( CMAKE_BUILD_TYPE STREQUAL Release)
#    SET( CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG" )
#    ADD_DEFINITIONS(-O2)
#    message( "build relase................. CXX_FLAGS: " ${CMAKE_CXX_FLAGS_RELEASE} )
#ENDIF()
#
#
##boost set
#SET(BOOST_ROOT "/usr/include/boost")
#find_package(Boost REQUIRED COMPONENTS date_time filesystem thread system)
#if( NOT Boost_FOUND)
#    message("not found boost")
#endif()
#message(${Boost_INCLUDE_DIRS})

AUX_SOURCE_DIRECTORY(. DIR_SRCS)
ADD_EXECUTABLE(${PROJECT_NAME} ${DIR_SRCS})
INCLUDE(${PROJECT_SOURCE_DIR}/../cmake_foot.cmake)
#target_link_libraries(${PROJECT_NAME} ${PROJECT_SOURCE_DIR}/../../libs/libshare.a)
#target_link_libraries(${PROJECT_NAME} ${PROJECT_SOURCE_DIR}/../../libs/libjson.a)
#target_link_libraries(${PROJECT_NAME} /usr/local/lib/liblua.so)
#target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})

target_link_libraries(${PROJECT_NAME} /usr/local/share/mysql/lib/libmysqlclient.so)
# The version number.
